﻿using Abp.Domain.Repositories;
using Mt.Site.Core.WorkFlows.Diy;
using Mt.Site.Core.WorkFlows.Process.Entities;
using Mt.Site.Core.WorkFlows.Process.Stores;
using System;
using System.Threading.Tasks;

namespace Mt.Site.Core.WorkFlows.Process
{
    public interface IWorkFlowRollBackService
    {
        /// <summary>
        /// 管理员回退稿件
        /// </summary>
        /// <param name="taskId"></param>
        /// <param name="paperId"></param>
        /// <returns></returns>
        Task RollBackAsync(Guid taskId, Guid paperId, IWorkFlowRollBackDiyService workFlowRollBackDiyService);

        /// <summary>
        /// 稿件撤回
        /// </summary>
        /// <param name="workFlowManager"></param>
        /// <returns></returns>
        Task<Guid> WithdrawAsync(IWorkFlowManager workFlowManager, bool cleanMsg);

        /// <summary>
        /// 检查撤回操作是否可以执行（是否显示撤回按钮）
        /// </summary>
        /// <param name="workFlowManager"></param>
        /// <returns></returns>
        Task<bool> CheckWithdrawBtnState(IWorkFlowManager workFlowManager);


        IRepository<WorkFlowProcess, Guid> WorkFlowProcessRepository { get;  }
        IRepository<WorkFlowLogs, long> WorkFlowLogsRepository { get; }
    }
}
